# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer : Justin "juster" Davis <jrcd83@gmail.com>

pkgname=perl-html-form
pkgver=6.11
pkgrel=2
pkgdesc="Class that represents an HTML form element"
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.8.8' 'perl-html-parser' 'perl-http-message' 'perl-uri>=1.10')
conflicts=('perl-libwww<6')
url=https://search.cpan.org/dist/HTML-Form
source=("https://search.cpan.org/CPAN/authors/id/S/SI/SIMBABQUE/HTML-Form-${pkgver}.tar.gz")

build() {
  cd "${srcdir}/HTML-Form-${pkgver}"
  PERL_MM_USE_DEFAULT=1 PERL5LIB="" \
    PERL_AUTOINSTALL=--skipdeps \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='"$pkgdir"'" \
    PERL_MB_OPT="--installdirs vendor --destdir '"$pkgdir"'" \
    MODULEBUILDRC=/dev/null perl Makefile.PL
  make
}

check() {
  cd "${srcdir}/HTML-Form-${pkgver}"
#  PERL_MM_USE_DEFAULT=1 PERL5LIB="" make test
}

package() {
  cd "${srcdir}/HTML-Form-${pkgver}"
  make DESTDIR="$pkgdir" install
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
sha256sums=('43bfaa7087393487d2d51261a1aa7f6f81a97b1d8fef7a48fcf6ef32b16d6454')
